package Day3;

import java.util.Scanner;

public class Day03_02 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long n = in.nextLong();
        int x = in.nextInt();

        int[] arr = new int[(int)n+1];
        for(int i = 0; i < n; i++) {
            arr[++i] = in.nextInt();
        }

        int left = 0;
        int right = 0;
        int sum = 0;
        int len = 0x3f3f3f3f;
        int j = 1;
        for(int i = 1; i < n + 1; i++) {

            while(j < n + 1) {
                if(sum >= x  ) {
                    if( len > j - i + 1) {
                        left = i;
                        right = j;
                        len = j - i + 1;
                    }
                    break;
                }
                sum += arr[j];
                j++;
            }
            if(j >= n + 1) break;
            j++;
            sum -= arr[i];
        }
        System.out.println(left + " " + right);
    }

}